﻿package 
{
	import com.kassius.video.Webcam;
	
	import flash.events.MouseEvent
	import flash.display.MovieClip;


	
	/**
	 * ...
	 * @author ...
	 */
	public class webcam extends MovieClip
	{
		var cam:Webcam;
		
		public function webcam():void
		{
			cam = new Webcam( 320, 240, 0, 30, 100 );
			addChild( cam );
			
			cam.x = ( stage.stageWidth / 2 ) - ( cam.width / 2 );
			
			btSnapshot.buttonMode = true;
			btSnapshot.addEventListener( MouseEvent.CLICK, snap );
		}	
		
		private function snap( e:MouseEvent ):void
		{
			cam.snapshot( 320, 240, 100 );
		}
	}
}